package Day13.IO;

import java.io.*;

public class Demo5 {
/*
字节缓冲流：在源代码中内置了字节数组，可以提高读写效率

 */
    public static void main(String[] args) throws IOException {
    //创建字节缓冲输入流
        BufferedInputStream bis = new BufferedInputStream(new FileInputStream("D:\\A.txt"));


        //创建字节缓冲输出流
        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("C:\\A.txt"));

        //读写操作
        int i;
        while((i=bis.read())!=-1){
            bos.write(i);
        }
        //4、关闭
        bis.close();
        bos.close();


    }
}
